home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 38 / 038.d81 / color select (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  4KB  |  157 lines

  1. 5 sd$=""
  2. 6 j=56320
  3. 7 mm$(2)="[194]order     [157][157][157][157][157]":mm$(3)="[194]ackground"
  4. 10 rem color select
  5. 20 gosub 10000 : rem current setup
  6. 22 :
  7. 30 cp=bo:dd$="[194][207][210][196][197][210][146]":op=1
  8. 40 gosub 11000 : rem select new border
  9. 42 bo=cp
  10. 50 :
  11. 52 cp=bk:dd$="[194][193][195][203][199][210][207][213][206][196][146]":op=2
  12. 60 gosub 11000 : rem select new bk'grnd
  13. 62 bk=cp
  14. 70 :
  15. 72 cp=te:dd$="[212][197][216][212][146]":op=3
  16. 80 gosub 11000 : rem select new text
  17. 82 te=cp
  18. 84 ifbk=tethengosub30000:goto20
  19. 90 gosub 12000 : rem are these ok
  20. 92 ifnot(ok)then30
  21. 94 :
  22. 100 gosub 15000: rem current side
  23. 102 sb=si      : rem side booted
  24. 105 ns=2       : rem number of sides
  25. 110 cs=1
  26. 120 gosub13000 : rem write data to file
  27. 130 cs=cs+1    : rem on side cs
  28. 140 ifcs<=nsthen120
  29. 150 :
  30. 160 gosub14000 : rem put side sb in
  31. 10000 rem get current setup
  32. 10010 open15,8,15,"i0"
  33. 10020 open3,8,4,"setup"
  34. 10030 input#3,d$(1),d$(2),d$(3),d$(4),d$(5),d$(6),d$(7)
  35. 10040 bo=val(d$(1))
  36. 10042 bk=val(d$(2))
  37. 10044 te=val(d$(3))
  38. 10046 close3:close15
  39. 10050 return
  40. 10060 :
  41. 11000 rem  select new something...
  42. 11005 print"[147]"
  43. 11010 print"":poke646,te
  44. 11020 poke53280,bo:poke53281,bk
  45. 11030 aa$="[211]elect new "+dd$+" color":printspc(20-len(aa$)/2)aa$
  46. 11032 print"         by moving arrow with"
  47. 11040 print" joystick or cursor keys.  [212]o select a"
  48. 11050 print"   color, press [[211][208][193][195][197]] or [198][201][210][197][194][213][212][212][207][206]."
  49. 11055 if(op<>1)thenprint"    [208]ress [198]1 to re-select "mm$(op)".":goto11060
  50. 11056 print"                                     [160]"
  51. 11060 print""spc(10)"[208]ress '_' to exit."
  52. 11070 :
  53. 11080 printsd$;
  54. 11090 forx=0to15:poke646,x:print" ";:next:print"[146]"
  55. 11095 poke646,te
  56. 11100 :
  57. 11110 printsd$""spc(cp)"^"
  58. 11120 :
  59. 11130 jy=peek(j):ifjy=127andpeek(198)=0then11130
  60. 11140 geta$
  61. 11145 if(a$="[133]")and(op<>1)thenop=op-1:goto11260
  62. 11150 ifjy=111ora$=chr$(32)then11240
  63. 11155 ifa$="_"thengosub20000:goto11005
  64. 11160 :
  65. 11170 ifjy=123ora$="[157]"ora$=""thenprintsd$""spc(cp)" ":cp=cp-1:mm=-1:goto11190
  66. 11180 ifjy=119ora$=""thenprintsd$""spc(cp)" ":cp=cp+1:mm=1:goto11190
  67. 11185 goto11130
  68. 11190 gosub16000:rem make sure text and       background aren't the same
  69. 11192 ifcp<0thencp=15
  70. 11195 ifcp<0thencp=15
  71. 11200 ifcp>15thencp=0
  72. 11210 printsd$""spc(cp)"^"
  73. 11215 ifop=1thenbo=cp
  74. 11216 ifop=2thenbk=cp
  75. 11217 ifop=3thente=cp
  76. 11220 goto11010
  77. 11230 :
  78. 11240 return
  79. 11250 :
  80. 11260 printsd$""spc(cp)" "
  81. 11270 onopgoto30,52,72
  82. 12000 rem these ok
  83. 12005 :
  84. 12010 print"[147] [193]re these settings what you want ([217]/[206])?"
  85. 12020 poke198,0:wait198,1:geta$
  86. 12025 ifa$<>"y"anda$<>"n"then12020
  87. 12030 ifa$="y"thenok=-1
  88. 12040 ifa$="n"thenok=0
  89. 12050 return
  90. 13000 rem  write data to disk
  91. 13010 print"[147][144]":poke53281,1:poke53280,4
  92. 13020 print"  [208]lease place side #"cs"of [204][207][193][196][211][212][193][210] in"
  93. 13025 print"     the drive and press [[211][208][193][195][197]]."
  94. 13030 poke198,0:wait198,1:geta$:ifa$<>" "then13030
  95. 13040 gosub15000: rem what side is it?
  96. 13050 ifsi=csthen13100
  97. 13060 print"   !!! [211]ide #"cs"not found... !!!"
  98. 13070 fordl=1to2000:next:goto13000
  99. 13080 :
  100. 13100 rem  ok, write data
  101. 13110 open15,8,15,"i0"
  102. 13120 d$(1)=mid$(str$(bo),2)
  103. 13122 d$(2)=mid$(str$(bk),2)
  104. 13124 d$(3)=mid$(str$(te),2)
  105. 13130 open3,8,4,"setup":cr$=chr$(13)
  106. 13140 print#15,"p"chr$(0)"";
  107. 13150 print#3,d$(1)cr$d$(2)cr$d$(3)cr$d$(4)cr$d$(5)cr$d$(6)cr$d$(7)cr$
  108. 13160 close3:close15
  109. 13170 return
  110. 13180 :
  111. 13999 end
  112. 14000 rem  put side one back in
  113. 14010 print"[147][144]":poke53281,1:poke53280,4
  114. 14020 print"  [208]lease place side # 1 of [204][207][193][196][211][212][193][210] in"
  115. 14022 print" your drive and press [211][208][193][195][197] to return"
  116. 14024 print" to [204][207][193][196][211][212][193][210]."
  117. 14030 poke198,0:wait198,1:geta$:ifa$<>" "then14030
  118. 14040 gosub15000: rem what side is it?
  119. 14050 ifsi=1then14100
  120. 14060 print"   !!! [211]ide # 1 not found... !!!"
  121. 14070 fordl=1to2000:next:goto14000
  122. 14080 :
  123. 14100 goto60000 : rem connect back
  124. 14130 :
  125. 15000 rem read current side
  126. 15010 open15,8,15,"i0":close15
  127. 15020 open2,8,2,"$"
  128. 15030 fori=0to156:get#2,a$:next
  129. 15040 get#2,a$:si=val(a$):close2
  130. 15050 return
  131. 15060 :
  132. 16000 if(op=1)thenreturn
  133. 16001 ifcp>15then16020
  134. 16002 ifcp<.then16030
  135. 16004 if(bk+mm<>te)and(op=2)thenreturn
  136. 16005 if(bk<>te+mm)and(op=3)thenreturn
  137. 16008 if(bk<>te+mm)and(op=3)thenreturn
  138. 16010 cp=cp+mm
  139. 16020 if(cp>15)and(bk=.)and(op=3)thencp=1
  140. 16030 if(cp<0)and(te=15)and(op=2)thencp=14
  141. 16060 return
  142. 20000 rem quit
  143. 20010 print"[147]  [193]re you sure you want to quit ([217]/[206])?"
  144. 20020 poke198,0:wait198,1:geta$
  145. 20025 ifa$<>"y"anda$<>"n"then20020
  146. 20030 ifa$="y"then60000 : rem quit
  147. 20040 ifa$="n"thenreturn
  148. 20050 :
  149. 30000 rem same background and text
  150. 30010 poke53281,1:print"[147][144]   [215]hy did you pick the same color for"
  151. 30020 print"    the [194][193][195][203][199][210][207][213][206][196] and the [212][197][216][212]???"
  152. 30030 print"          [212]ry picking again..."
  153. 30040 fordl=1to3200:next:return
  154. 60000 rem  return to customize menu
  155. 60010 print"[147]load"chr$(34)"custom ls boot"chr$(34)",8":print"run"
  156. 60020 poke631,13:poke632,13:poke198,2:end
  157.